#pragma once
#include <stdio.h>
#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
typedef int HeapDataType;
typedef struct Heap
{
	HeapDataType* arr;
	int size;
	int capacity;
}Heap;

void HeapInit(Heap* hp);
void HeapDestroy(Heap* hp);

void HeapPush(Heap* hp, HeapDataType x);
void HeapPop(Heap* hp);

HeapDataType HeapTop(Heap* hp);
int HeapSize(Heap* hp);
bool HeapEmpty(Heap* hp);
void Swap(int* p1, int* p2);
void AdjustDown(HeapDataType* arr, int parent, int size);